package com.dhcc.model;

import javax.persistence.*;

/**
 * Created by guorui on 2017/3/17.
 */
@Entity
@Table(name = "tb_dtz_content", schema = "test", catalog = "")
public class DtzContent {
    private int id;
    private int tmId;
    private String answer;
    private String isTrue;
    private String score;
    private int teaId;
    private String remark;

    @Id
    @Column(name = "id", nullable = false)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "tm_id", nullable = false)
    public int getTmId() {
        return tmId;
    }

    public void setTmId(int tmId) {
        this.tmId = tmId;
    }

    @Basic
    @Column(name = "answer", nullable = true, length = 255)
    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    @Basic
    @Column(name = "is_true", nullable = false, length = 8)
    public String getIsTrue() {
        return isTrue;
    }

    public void setIsTrue(String isTrue) {
        this.isTrue = isTrue;
    }

    @Basic
    @Column(name = "score", nullable = false, length = 8)
    public String getScore() {
        return score;
    }

    public void setScore(String score) {
        this.score = score;
    }

    @Basic
    @Column(name = "tea_id", nullable = false)
    public int getTeaId() {
        return teaId;
    }

    public void setTeaId(int teaId) {
        this.teaId = teaId;
    }

    @Basic
    @Column(name = "remark", nullable = true, length = 255)
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        DtzContent that = (DtzContent) o;

        if (id != that.id) return false;
        if (tmId != that.tmId) return false;
        if (teaId != that.teaId) return false;
        if (answer != null ? !answer.equals(that.answer) : that.answer != null) return false;
        if (isTrue != null ? !isTrue.equals(that.isTrue) : that.isTrue != null) return false;
        if (score != null ? !score.equals(that.score) : that.score != null) return false;
        if (remark != null ? !remark.equals(that.remark) : that.remark != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + tmId;
        result = 31 * result + (answer != null ? answer.hashCode() : 0);
        result = 31 * result + (isTrue != null ? isTrue.hashCode() : 0);
        result = 31 * result + (score != null ? score.hashCode() : 0);
        result = 31 * result + teaId;
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        return result;
    }
}
